home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / KIDD0002.MOD < prev    next >
Encoding:
Text File  |  1993-09-21  |  4.7 KB  |  160 lines

  1. KIDD0002.MOD
  2. Kidd #20 @8315
  3. 3Wednesday, July 15, 1992  1 4:09 pm
  4. 7[1Msg Status7]2: 1Reply Requested.
  5.  
  6.        
  7. MOD Name    - KIDD0002    
  8. Author      - Kidd
  9. Date        - 7/13/92
  10. Version     - WWIV v4.21 <may work with older/newer versions>
  11.  
  12. Explanation - I found a nice little MOD that asked by The Flying Chicken
  13.           that put in a log on lottery to use with the Gold System MODs.
  14.           I really hate the Gold System so I made a few modifications
  15.           to his MOD.  All credit goes to The Flying Chicken.  I just
  16.           used what was already there.
  17.  
  18. Disclaimer  - I'm not responsible.  Use it as your own risk!
  19.  
  20. /***************************************************************************\
  21.  
  22. Legend -
  23.  
  24. == existing code
  25. ++ add code
  26. -- delete code
  27.  
  28. /***************************************************************************\
  29.  
  30. Step One - Backup source code.  If you really need to.  Your choice.
  31.  
  32. Step Two - Load up LILO.C and search for -> void logon() <- 
  33.        Add this procedure right before it.  Follow directions on the 
  34.        left margin!
  35.  
  36. ++ void slot_machine()
  37. ++ {
  38. ++     int i,p1,p2,p3,matches,time;
  39. ++     char s[81];
  40. ++ 
  41. ++     nl();
  42. ++     sprintf(s,"2Welcome to 1%s's 3M2ega 3T2ime 3S2lot 3M2achine6!",syscfg.systemname);
  43. ++     prt(2,s);
  44. ++     nl();
  45. ++     nl();
  46. ++     prt(2,"You will see three numbers changing rapidly below.  When you are");
  47. ++     nl();
  48. ++     prt(2,"ready, press a key to lock in the first number.  Then lock in the");
  49. ++     nl();
  50. ++     prt(2,"last two numbers the same way.  If two of the numbers match, you");
  51. ++     nl();
  52. ++     prt(2,"will receive 552 more minutes.  If all three match, you will win");
  53. ++     nl();
  54. ++     prt(2,"5102 more minutes.  Good luck6!");
  55. ++     nl();
  56. ++     nl();
  57. ++     npr("* * *\b\b\b\b\b");
  58. ++     i=0;
  59. ++     do {
  60. ++     npr("%d\b",i);
  61. ++     i++;
  62. ++     if (i>9)
  63. ++         i=0;
  64. ++     } while (inkey()==0);
  65. ++     p1=i;
  66. ++     npr("%d ",p1);
  67. ++     i=5;
  68. ++     do {
  69. ++     npr("%d\b",i);
  70. ++     i++;
  71. ++     if (i>9)
  72. ++         i=0;
  73. ++     } while (inkey()==0);
  74. ++     p2=i;
  75. ++     npr("%d ",p2);
  76. ++     i=9;
  77. ++     do {
  78. ++     npr("%d\b",i);
  79. ++     i++;
  80. ++     if (i>9)
  81. ++         i=0;
  82. ++     } while (inkey()==0);
  83. ++     p3=i;
  84. ++     npr("%d \r\n",p3);
  85. ++ 
  86. ++     matches=0;
  87. ++     if (p1==p2)
  88. ++     matches++;
  89. ++     if (p1==p3)
  90. ++     matches++;
  91. ++     if (p2==p3)
  92. ++     matches++;
  93. ++ 
  94. ++     ansic(1);
  95. ++     if (matches==1) {
  96. ++     nl();
  97. ++     npr("6Two 2numbers matched6!\r\n");
  98. ++     time=5;
  99. ++     thisuser.extratime+=5.0*60.0;    
  100. ++     tleft(0);
  101. ++     }
  102. ++     if (matches==3) {
  103. ++     nl();
  104. ++     npr("2My GOD you matched 6three 2numbers6!!\r\n");
  105. ++     time=10;
  106. ++     thisuser.extratime+=10.0*60.0;
  107. ++     tleft(0);
  108. ++     }
  109. ++     if (matches==0) {
  110. ++     nl();    
  111. ++     npr("2No numbers matched\r\n");
  112. ++     }
  113. ++ 
  114. ++     nl();
  115. ++     if (matches>0) {
  116. ++    npr("2Congratulations6!!2 You have just won 7%d 2more minutes6!!\r\n",time);
  117. ++     sprintf(s,"!!! %s won %d more minutes at the slot machine !!!",nam(&thisuser,usernum),time);
  118. ++     sysoplog(s);
  119. ++     } else 
  120. ++     npr("2Aww...5Better luck next time\r\n");
  121. ++ 
  122. ++     nl();
  123. ++     prt(2,"Thanxs for playing ");
  124. ++     prt(1,syscfg.systemname);
  125. ++     prt(1,"'s 3M2ega 3T2ime 3S2lot 3M2achine6!");
  126. ++     nl();
  127. ++     nl();
  128. ++ }
  129.  
  130. /*This part is set up to give users 5 minutes if 2 matches and 10 if three
  131.   matches.  You can alter this by changing the xx.x in this line
  132.   ─> 'thisuser.extratime+=xx.x*60.0' <─ and then changing ─> time=xx <─.*/
  133.  
  134. Step Three - Now search for ─> 'void logon()' <─.  Find this line 
  135.          ─> status.net_version); <─.  Right after it add this.
  136.  
  137. ++    if (thisuser.ontoday<4) {                    
  138. ++     nl();                                                    
  139. ++     prt(2,"Would you like to try the Lottery? ");            
  140. ++     if (yn())                                                
  141. ++         slot_machine();                                      
  142. ++     }                                                            
  143.  
  144. /*This part is set up to let the user play only three times a day.  To
  145.   alter change the x in ─> if (thisuser.ontoday<x) { <─ to the number
  146.   of times you want them to play*/ 
  147.  
  148. Step Four - Save LILO.C and compile!
  149.  
  150. /***************************************************************************\
  151.  
  152. This is a product from the Trixter BBS brought to you by the Kidd!  If you 
  153. find anything wrong, or anything that could be written better just post on
  154. the net!
  155.  
  156.         
  157. 7===============================================================================0
  158.       7░░▒▒▓▓ 1T2he 1T2rading 1P2ost 7[1SOUTH7]  5WWIVNet 1@8315  3803-731-0690 7▓▓▒▒░░0
  159. 4ßeta test and distribution site for WOMR, ECLIPSE, WWIVEDIT, AND S. REALMS!0
  160.